<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("basePath", basePath);

	String outPatientVisitInfoJson = (String) request.getAttribute("outPatientVisitInfoJson");
	String success = (String) request.getAttribute("success");
%>
<link href="${basePath}/static/css/Pigeonhole/Pigeonhole_list.css"
	rel="stylesheet" type="text/css">
<link rel="stylesheet"
	href="${basePath}/static/css/medicalRecord_Search/medicalSearch.css" />
<script type="text/javascript"
	src="${basePath}/static/publics/assets/jqPaginator/jqPaginator.js"></script>
<script type="text/javascript" src="${basePath}assets/js/echarts.js"></script>
<div class="list_NR">
	<div class="loc">
		<h3>统计报告</h3>
		<ul class="loc_loc">各科室出院统计指标
		</ul>
	</div>

	<div class="list_con_table">

		<form id="infoListForm">
			<table style="width: 100%;" cellpadding="0" cellspacing="0"
				id="table">
				<tbody>

					<td colspan="6" style="text-align: right;"><input
						type="button" value="导出" class="btn"
						onclick="exportOutEachDeptWord()"> <input type="button"
						value="保存" class="btn" onclick="saveOutEachDept()"></td>


					<tr>
						<td class="tdLabel_7" style="width: 60px">出院患者统计指标</td>
						<td class="tdLabel_8" colspan="7" style="width: 990px"><textarea
								style="width: 97%; height: 600px" name="text">${outHospStatisIndexInfo.text}</textarea>
						</td>
					</tr>

					<tr>
						<td class="tdLabel_7" style="width: 60px">说明</td>
						<td class="tdLabel_8" colspan="7" style="width: 990px"><textarea
								style="width: 97%; height: 150px" name="note" id="note">${outHospStatisIndexInfo.note}</textarea>
						</td>
					</tr>


					<tr>
						<td class="tdLabel_8" colspan="7">
							<table
								style="margin: 0 auto; float: left; border-collapse: collapse;"
								cellpadding="0" cellspacing="0">
								<tr>
									<td colspan="12" style="text-align: center; font-size: 16px;">
										表2 各科室出院患者统计指标</td>
								</tr>
								<tr>
									<td class="tdLabel_4">出院科室</td>
									<td class="tdLabel_4">出院人次数</td>
									<td class="tdLabel_4">死亡人数</td>
									<td class="tdLabel_4">出院当天再住院人数</td>
									<td class="tdLabel_4">平均住院天数</td>
									<td class="tdLabel_4">术前平均住院天数</td>
									<td class="tdLabel_4">术后平均住院天数</td>
									<td class="tdLabel_4">手术及治疗性操作人次数</td>
									<td class="tdLabel_4">三四级手术及治疗性操作人次数</td>
									<td class="tdLabel_4">患者平均住院费用</td>
									<td class="tdLabel_4">药占比(%)</td>
									<td class="tdLabel_4">一次性耗材占比(%)</td>
								</tr>

								<c:forEach var="obj"
									items="${outHospStatisIndexInfo.outHospStatisIndexRecordList}">
									<tr>
										<td class="tdLabel_8"><input class="input_box"
											type="text" style="width: 95%" value="${obj.officeName}" /></td>
										<td class="tdLabel_8"><input class="input_box"
											type="text" style="width: 95%" value="${obj.outNum}" /></td>
										<td class="tdLabel_8"><input class="input_box"
											type="text" style="width: 95%" value="${obj.deathNum}" /></td>
										<td class="tdLabel_8"><input class="input_box"
											type="text" style="width: 95%" value="${obj.reOutHospInNum}" /></td>
										<td class="tdLabel_8"><input class="input_box"
											type="text" style="width: 95%" value="${obj.avgInHospDays}" /></td>
										<td class="tdLabel_8"><input class="input_box"
											type="text" style="width: 95%"
											value="${obj.beforeOpAvgInHospDays}" /></td>
										<td class="tdLabel_8"><input class="input_box"
											type="text" style="width: 95%"
											value="${obj.afterOpAvgInHospDays}" /></td>
										<td class="tdLabel_8"><input class="input_box"
											type="text" style="width: 95%"
											value="${obj.surgicalTherapeuticOpNum}" /></td>
										<td class="tdLabel_8"><input class="input_box"
											type="text" style="width: 95%"
											value="${obj.thirdForthSurgicalTherapeuticOpNum}" /></td>
										<td class="tdLabel_8"><input class="input_box"
											type="text" style="width: 95%" value="${obj.avgCostFee}" /></td>
										<td class="tdLabel_8"><input class="input_box"
											type="text" style="width: 95%" value="${obj.drugProportion}" /></td>
										<td class="tdLabel_8"><input class="input_box"
											type="text" style="width: 95%"
											value="${obj.disposableConsumableProportion}" /></td>
									</tr>
								</c:forEach>
							</table>
						</td>
					</tr>









				</tbody>
			</table>


		</form>
	</div>
</div>






<script>
	function saveOutEachDept() {

		var note = $("#note").val();
		$.ajax({
			type : "post",
			data : {
				note : note
			},
			url : "${basePath}/report/saveOutPatientEachDeptInfo",
			success : function(data) {
				layer.alert(data.msg,{icon:1});
				return;
			}
		})
	}

	function exportOutEachDeptWord() {
		window.location.href = "${basePath}/report/exportOutEachDeptWord";
	}
</script>